function checkForm(){
	var name = document.getElementById('user')
	var pwd = document.getElementById('pwd')
	var checknum = document.getElementById('chknumber')
	if(name.value == ''){
		alert('用户名不能为空，请输入用户名');
		return false;
	}
	if(pwd.value == ''){
		alert('密码不能为空');
		return false;
	}
	if(checknum.value == ''){
		alert('验证码不能为空');
		return false;
	}	
	return true;
}
function form_submit(){
	if(checkForm())
		document.getElementById("login").submit();
}
function form_reset(){
	document.getElementById("login").reset();
}
function reloadcode(){
    var verify=document.getElementById('safecode');
    verify.setAttribute('src','Public/checkcode.php?t='+Math.random());
}